#ifndef BUFF_H
#define BUFF_H
#include"maps.h"
#include <QTime>
#include <QtGlobal>
#include<QString>
#include <QWidget>
#include <QObject>
#include<QTimer>
#include"base.h"
class buff: public QObject
{Q_OBJECT
public:
    const QString wdpic=":/:/new/wall/image/item/wd.png";
    const QString buffpic[3]{":/:/new/wall/image/item/hpbuff.png",
                            ":/:/new/wall/image/item/speedbuff.png",
                                                        ":/:/new/wall/image/item/wdbuff.png"};
    int update=0;
    QTimer* timer;
    static int buffpos[3][3];//地图上限三个,2,3buff横纵坐标1buff种类
    //mode为0的时候为未刷新状态的buff，
    //1为增加血量，3为持续一定时间的无敌buff且玩家吃了附带血量补为4，2为加速buff
    void setbuff(int c);
    void initbuff();
    buff();
public slots:
    void buffupdate();
};

#endif // BUFF_H
